<template>
    <span class="tnxbsv-loading-icon spinner-border" :class="extraClass" role="status">
        <span class="visually-hidden">{{ text }}</span>
    </span>
</template>

<script>

export default {
    name: 'TnxbsvLoadingIcon',
    props: {
        small: {
            type: Boolean,
            default: true,
        },
        theme: {
            type: String,
            default: 'secondary',
        },
        text: {
            type: String,
            default: '加载中...',
        }
    },
    data() {
        return {};
    },
    computed: {
        extraClass() {
            let extraClass = '';
            if (this.theme && this.theme !== 'inherit') {
                extraClass += ' text-' + this.theme;
            }
            if (this.small) {
                extraClass += ' spinner-border-sm';
            }
            return extraClass.trim();
        },
    },
    methods: {}
}
</script>

<style>

</style>
